<?php
/* Feed parse code */
	while(list($index,$record)=each($fdat)){
		//echo htmlspecialchars($record)."<hr>";
		$full_data = $full_data.$record;
	}

	$data_set = explode('<entry>',$full_data);
	while(list($index,$record)=each($data_set)){
		if(!stristr($record,'<feed')){
			//echo htmlspecialchars($record);

			$dataAt['metaverse'] = $metaverse;
			$temp = explode('<author>',$record);
			$temp = explode('</author>',$temp[1]);
				$temp = explode('<name>',$temp[0]);
				$temp = explode('</name>',$temp[1]);
					$dataAt['author']=trim($temp[0]);
			$temp = explode('<uri>',$temp[1]);
			$temp = explode('</uri>',$temp[1]);
			$temp = explode('/',$temp[0]);
				$dataAt['author_id'] = trim($temp[4]);
			
			$temp = explode('<updated>',$record);
			$temp = explode('</updated>',$temp[1]);
			//echo $temp[0]." -- ".substr($temp[0],0,10)." -- ".date("Y-m-d", strtotime(substr($temp[0],0,10)))."<br>";
			//	$dataAt['updated'] = date("Y-m-d", strtotime($temp[0]));					
			$dataAt['updated'] = substr($temp[0],0,10);					
	
			$temp = explode('</title>',$record);
			/*$temp = explode('<title title="html">',$temp[0]);*/
			$temp = explode('<title>',$temp[0]);
				$dataAt['title'] = trim($temp[1]);
			$temp = explode('<link rel="alternate" href="',$record);
			$temp = explode('/',$temp[1]);
				$dataAt['id']=trim($temp[4]);
				$id_list[]=$dataAt['id'];
	
			$temp = explode('<summary type="html">',$record);
			$temp = explode('</summary',$temp[1]);
			$temp = explode('Chapters: ',$temp[0]);
			$tmp = explode(',',$temp[1]);
				$dataAt['chapters']=trim($tmp[0]);
				if($dataAt['chapters']==''){ $dataAt['chapters'] = "1"; }
	
			$temp = explode('&lt;hr size=1&gt;',$temp[1]);
				$dataAt['summary']=trim($temp[1]);
			
			$dataAts[] = $dataAt;
		}
	}

?>
